import request from '@/utils/request'

// 获取当前用户信息
export const getCurrentUser = () => {
    return request({
        url: '/healthSys/user/current',
        method: 'get'
    })
}

// 获取健康记录
export const getHealthRecords = (params) => {
    return request({
        url: '/health/records',
        method: 'get',
        params
    })
}

// 删除记录
export const deleteHealthRecord = (recordId) => {
    return request({
        url: `/health/records/${recordId}`,
        method: 'delete'
    })
}

// 获取血压数据
export const getBloodPressureData = (userId) => {
    return request({
        url: `/health/records/blood-pressure/${userId}`,
        method: 'get'
    })
}

// 获取血糖数据
export const getBloodSugarData = (userId) => {
    return request({
        url: `/health/records/blood-sugar/${userId}`,
        method: 'get'
    })
}
